<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的位置</title>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=2b866a6daac9014292432d81fe9b47e3"></script>
    <script src="http://d1.lashouimg.com/static/js/release/jquery-1.4.2.min.js" type="text/javascript"></script>

    <style type="text/css">
        html,body{
            width:100%;
            height:100%;
            margin:0;
            overflow:hidden;
        }
    </style>
</head>
<body>
<div style="width:100%;height:100%;border:1px solid gray" id="container">
</div>
</body>
</html>
<script type="text/javascript">
    var map = new BMap.Map("container");
    <!--{if $shop_info.0.latitude}-->
    map.centerAndZoom(new BMap.Point('<!--{$shop_info.0.latitude}-->','<!--{$shop_info.0.longitude}-->'), 30);
    map.enableScrollWheelZoom();
    var marker=new BMap.Marker(new BMap.Point('<!--{$shop_info.0.latitude}-->','<!--{$shop_info.0.longitude}-->'));
    map.addOverlay(marker);
    var licontent= "<p><!--{$shop_info.0.name}--></p><p>电话号码(<!--{$shop_info.0.contact_number}-->)</p>";
    var opts1 = { width: 200 };

    var  infoWindow = new BMap.InfoWindow(licontent, opts1);
    marker.openInfoWindow(infoWindow);
    map.addControl(new BMap.NavigationControl());
    //map.addControl(new BMap.ScaleControl());//显示在地图下方，告诉你地图上1cm对应的真实距离
    map.addControl(new BMap.MapTypeControl());//地图的显示类型：包括地图和卫星
    marker.addEventListener('click',function(){ marker.openInfoWindow(infoWindow);});
    <!--{else}-->
    //确定搜索对象
    var local=new BMap.LocalSearch(map,{
        renderOptions:{map:map}
    });
    //根据关键字定义到相应的区域
    local.search("成都");
    <!--{/if}-->
</script>
